<template>
  <div class="myboxs">
    <div class="item_box">
      <div class="left_box"></div>
      <div class="right_box ">
        <div class="bg"></div>
        <div class="box_title">井盖</div>
        <div class="value">
          <div class="box_value">{{ onebox.field_value }}</div>
          <div class="box_unit">个</div>
        </div>
      </div>
    </div>
    <div class="item_box">
      <div class="left_box bg1"></div>
      <div class="right_box ">
        <div class="bg"></div>
        <div class="box_title">路灯</div>
        <div class="value">
          <div class="box_value">{{ twobox.field_value }}</div>
          <div class="box_unit">个</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
  name: '',
  data () {
    return {
      onebox: {},
      twobox: {}
    }
  },
  mounted () {
    this.initData()
  },
  methods: {
    initData () {
      postAction('/topic/data/listAllData/dy_dp_csgl_csbj_shqk_month', {}).then(res => {
        if (res.success) {
          this.onebox = res.result.data[0]
          this.twobox = res.result.data[1]
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.myboxs {
  display: flex;
  justify-content: space-between;

  .item_box {
    display: flex;
    width: 140px;

    .left_box {
      width: 50px;
      height: 47px;
      background: url('./img/9.png');
    }

    .bg1 {
      background: url('./img/10.png');
    }


    .right_box {
      position: relative;

      .box_title {
        font-family: Microsoft YaHei;
        font-weight: 400;
        font-size: 16px;
        color: #FFFFFF;
      }

      .box_value {
        font-family: Microsoft YaHei;
        font-weight: bold;
        font-size: 20px;
        color: #FFDE00;
      }

      .box_unit {
        font-family: Microsoft YaHei;
        font-weight: 400;
        font-size: 12px;
        color: #AEEDEC;
      }

      .bg {
        position: absolute;
        top: 10px;
        width: 92px;
        height: 11px;
        background: url('./img/7.png')no-repeat;
      }

      .value {
        display: flex;

        .box_unit {
          margin-top: 5px;
          margin-left: 5px;
        }
      }
    }
  }

}
</style>
